export default {
  getStore(localStorageKeyName: string, cb: any) {
    const value = window.localStorage.getItem(localStorageKeyName);
    const data = JSON.parse(value && value !== 'undefined' ? value : '[]');
    setTimeout(() => {
      cb(data);
    }, 0);
  },
  setStore(localStorageKeyName: string, dataString: string) {
    window.localStorage.setItem(localStorageKeyName, dataString);
  },
};
